
export default defineNuxtPlugin(nuxtApp => {
    nuxtApp.vueApp.directive('permission', {
        updated (el,binding,vnode) {
            var values = binding.value
            var permissionList =values[0]
            var codes  = values[1]
            var len = permissionList?.filter(c=>c==codes).length
            el.style.display = len ==0?"none":"block"
        },
        getSSRProps (binding, vnode) {
            // 你可以在这里提供SSR特定的props
            return {}
        }
    })
})
